﻿namespace Sina.Weibo
{
    using System;
    using System.Collections.Generic;

    public class WeiboConnectSession
    {
        internal WeiboConnectSession(WeiboAuthClient authClient)
        {
            this.AuthClient = authClient;
        }

        internal WeiboConnectSession()
        {
        }

        public string AccessToken { get; internal set; }

        public int ExpiresIn { get; internal set; }

        public string RemindIn { get; internal set; }

        public string UserId { get; internal set; }

        public IEnumerable<string> Scopes { get; internal set; }

        internal bool IsValid
        {
            get
            {
                return (!string.IsNullOrEmpty(this.AccessToken) &&
                    this.ExpiresIn > 60);
            }
        }

        internal WeiboAuthClient AuthClient { get; set; }

    }
}
